import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class FileOutputstreamDemo03 {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("MyFile\\src\\tmp\\test3.txt");

        for(int i = 0; i < 5; i++){
            fos.write("Hello".getBytes());
            fos.write("\n".getBytes());
        }
        FileOutputStream fos2 = new FileOutputStream("MyFile\\src\\tmp\\test3.txt",true);
        fos.write("appends information".getBytes());
        fos.close();
    }
}
